package com.tiancheng.trade.settlement.mapper.settlement;

import com.tiancheng.trade.settlement.mapper.TYBaseMapper;
import com.tiancheng.trade.settlement.model.settlement.SSettleLetters;
import com.tiancheng.trade.settlement.vo.settlement.admin.SSettleLettersDetailQueryVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 收入明细
 * 此类为[代码工厂]自动生成，继承了JpaRepository类，已经拥有基本的增删改成操作
 * <其他请自行扩展>
 *
 * @time 2021-05-13 16:21
 * @GeneratedByCodeFactory
 */
@Repository
public interface SSettleLettersMapper extends TYBaseMapper<SSettleLetters> {
    List<SSettleLetters> queryPage(@Param("param") SSettleLettersDetailQueryVo queryVo);
    Integer queryPageTotal(@Param("param") SSettleLettersDetailQueryVo queryVo);

    @Update("update s_settle_letters set adjust_count = adjust_count + #{adjustCount} where settle_letters_code = #{settleLettersCode}")
    int updateAdjustCount(@Param("settleLettersCode") String settleLettersCode, @Param("adjustCount") Integer adjustCount);
}